package org.springblade.modules.platform.vo.enums;

import java.util.HashMap;
import java.util.Map;

public enum PhysicalQuantityEnum {
    ZX("ZX","正向光束的X方向相对变形量"),
    ZZ("ZZ","正向光束的Z方向相对变形量"),
    NX("NX","逆向光束的Z方向相对变形量"),
    NZ("NZ","逆向光束的X方向相对变形量"),
    DELTAY("DELTAY","铟钢管的相对变形量"),
    DIPX("DIPX","倾角X"),
    DIPY("DIPY","倾角Y"),

    GAMA("GAMA","华腾绕角仪"),
    Z("Z","华腾双标仪"),
    ALPHA("ALPHA","华腾垂线仪X"),
    BETA("BETA","华腾垂线仪Y"),
    ;
    private String code;
    private String msg;

    private static Map<String, PhysicalQuantityEnum> valueMap;

    static {
        valueMap = new HashMap<>();
        for (PhysicalQuantityEnum e : values()){
            valueMap.put(e.code, e);
        }
    }
    PhysicalQuantityEnum(String code, String msg){
        this.code = code;
        this.msg = msg;
    }
    public static PhysicalQuantityEnum getEnum(Integer key) {
        if (!valueMap.containsKey(key)) {
            return null;
        }
        return valueMap.get(key);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
